﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Entities;
using DataAccess;

namespace InsuranceVehicle.AdminSite
{
    public partial class AdminSite : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            lblTime.Text = DateTime.Now.ToLongDateString() + DateTime.Now.ToLongTimeString();


            if (Session["Employee"] != null)
            {
                    EmployeeInfo emp = new EmployeeInfo();
                    emp = (EmployeeInfo)Session["Employee"];
                    lblUser.Text = "Hi, " + emp.Account.ToString();
            }
            else
            {
                Response.Redirect("LoginAdmin.aspx");
            }
        }

        protected void linkSingout_Click(object sender, EventArgs e)
        {
            Session.Abandon();
            Response.Redirect("LoginAdmin.aspx");
        }
    }
}